package com.ambimmort.shj.action.send.policy;

import com.ambimmort.shj.service.send.policy.SendPolicyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;

/**
 * Created by Josh on 2015/7/30.
 */
@Controller("/action/policy/getdevice.do")
public class GetDeviceInfo {
    @Autowired
    private SendPolicyService sendPolicyService;

    /**
     *
     * @param request
     * @param response
     * @param id
     * @return
     * @throws IOException
     */

    @RequestMapping("/action/policy/getdevice.do")
    @ResponseBody
    public String getDeviceInfo_policy(HttpServletRequest request,HttpServletResponse response, @RequestParam("id") String id) throws SQLException {

           return sendPolicyService.getDeviceInfoService(id);
    }
}
